export function timeFormat(time: number) {
    if (time < 60) {
        return `00:${formate(time)}`
    } else if (time < 3600) {
        let mins = time / 60
        mins = Math.floor(mins)
        let secondes = time % 60
        secondes = Math.floor(secondes) as unknown as number;
        return `${formate(mins)}:${formate(secondes)}`
    } else if (time > 3600) {
        let hours = time / 3600
        hours = hours.toFixed() as unknown as number;
        let mins = (time - 3600 * hours) / 60
        mins = mins.toFixed() as unknown as number;
        let secondes = time - 3600 * hours - 60 * mins
        secondes = secondes.toFixed() as unknown as number;
        return `${hours}: ${formate(mins)}: ${formate(secondes)}`
    }

}
export function playtimeFormat(time: number) {
    if (time < 60) {
        return `00:${formate(time)}`
    } else if (time < 3600 && time > 60) {
        let mins = time / 60
        mins = Math.floor(mins)
        let secondes = time % 60
        secondes = Math.floor(secondes)
        return `${formate(mins)}:${formate(secondes)}`
    }
}
function formate(time: number): string {
    if (time < 9.5) {
        return `0${Math.floor(time)}`
    }
    return `${Math.floor(time)}`
}